function [ g ] = g_function( h )

global G_FUNCTION;
global BETA;
% G_FUNCTION Summary of this function goes here
%   Detailed explanation goes here

if G_FUNCTION == 1                  % Funcion no lineal tanh
    g = tanh(BETA*h);            
else                                % Funcion no lineal exp
    g = 1 ./ (1 + exp(-2.*h.*BETA));
end
            

end

